package P084_EnumConstructor;

import org.junit.Test;

/**
 * @Description : 枚举构造函数
 *
 **/
public class EnumConstructor {


    @Test
    public void test(){
        System.out.println("春天: "+ Season.Spring);
        System.out.println("春天: "+ Season.Spring.getDesc());
    }

    enum Season{
        Spring("春"),Summer("夏"),Autumn("秋"),Winter("冬");

        private String desc;
        Season(String _desc){
            desc=_desc;
        }
        public String getDesc(){
            return desc;
        }
    }


}
